package com.pug.security.controller;

import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class UserController {

    @GetMapping("/user/list")
    @PreAuthorize("hasRole('Admin')")
    public String userList(){
        return "用户列表查询";
    }

    @GetMapping("/user/get/1")
    public String getuser(){
        return "根据id查询用户";
    }

    @GetMapping("/user/save")
    public String save(){
        return "保存用户";
    }


}
